<template>
	<view class="cnetent">
		<view class="like">
			<view style="text-align: center"> 猜您喜欢 </view>
			<view class="like-list">
				<view class="like-list-info" v-for="(item,index) in likeList" :key="index" @click="goAuctionInfo(likeList[index])">
					<image
						style="width: 320rpx; height: 240rpx;border-top-left-radius: 12rpx;border-top-right-radius: 12rpx;max-width: 320rpx;max-height: 240rpx;"
						:src="item.imageInfo"
						mode="aspectFill" />
					<view class="texts">
						<view class="texts-son">{{item.title}}</view>
					<!-- 	<text>起拍价: JPY{{item.startingPrice}}</text> -->
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
export default {
	data(){
		return {
			likeList:[],

		}
	},
	props:{
		infoId:{
			type:String,
			require:false
		}
	},
	created() {
		this.likeTems()
		console.log(this.infoId);
	},
	methods:{
		async likeTems() {
			let {result} = await uniCloud.callFunction({
				name: 'specialDetailsList',
				data:{
					auctionId:this.infoId,
					likeState:1
				}
			});
			console.log(result.data);
			console.log('-----');
			this.likeList = result.data.data
		},
		goAuctionInfo(info){
			uni.navigateTo({
				url: `/pages/particulars/particularsInfoList/particularsInfoList?info=${encodeURIComponent(JSON.stringify(info))}`
			});
		}
	}
}
</script>

<style lang="scss" scoped>
	.like {
		background-color: #fff;
		margin-top: 20rpx;
		padding: 30rpx 40rpx;
	
		.like-list {
			margin-top: 40rpx;
			display: flex;
			justify-content: space-between;
			align-items: center;
			flex-wrap: wrap;
	
			.like-list-info {
				box-shadow: 0px 0px 12rpx 6rpx #eee;
				border-radius: 12rpx;
				margin: 20rpx 0;
				width: 48%;
				height: 400rpx;
				justify-content: space-between;
				align-items: center;
				flex-wrap: wrap;
	
				.texts {
					width: 90%;
					padding: 10rpx 20rpx;
					display: flex;
					justify-content: space-between;
					align-items: center;
					flex-wrap: wrap;
	
					text {
						font-size: 28rpx;
						color: #ff3e3e;
						margin-top: 10rpx;
					}
	
					.texts-son {
						overflow: hidden; //超出的文本隐藏
						text-overflow: ellipsis; //溢出用省略号显示
						display: -webkit-box;
						-webkit-line-clamp: 1; // 超出多少行
						-webkit-box-orient: vertical;
					}
				}
			}
		}
	}
</style>